//
//  CountyInfo.m
//  HWZB
//
//  Created by 许成雄 on 2017/5/5.
//  Copyright © 2017年 wonders. All rights reserved.
//

#import "CountyInfo.h"

@implementation CountyInfo

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return @{
             @"countyId" : @"areaid",
             @"county" : @"area",
             @"cityId" : @"cityid"
             };
}

+ (NSValueTransformer *)countyIdJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)cityIdJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}



@end
